{include file="admin/header.htm"}
<table cellpadding="2" cellspacing="1" class="table_form">
    <caption>排序方式</caption>
    <tr>
        <td><a href="{$smarty.const.ADMIN_NAME}?m=admin&c=account&a=manage&order=userid"{if $order eq 'userid'} style="color:red;"{/if}>userid降序</a> | <a href="{$smarty.const.ADMIN_NAME}?m=admin&c=account&a=manage&order=lastvist"{if $order eq 'lastvist'} style="color:red;"{/if}>登陆时间降序</a></td>
    </tr>
</table>

<table align="center" cellpadding="0" cellspacing="1" class="table_list">
    <caption>管理员列表</caption>
    <tr>
        <th width="5%">userid</th>
        <th width="20%">管理员名称</th>
        <th>用户组</th>
        <th>强制QQ登陆</th>
        <th>自由账号</th>
        <th width="15%">最后登陆ip</th>
        <th width="10%">最后登陆地址</th>
        <th width="15%">最后登陆时间</th>
        <th>管理操作</th>
    </tr>
    
    {foreach $members.items as $member}
    <tr>
        <td class="align_c">{$member.userid}</td>
        <td class="align_c"><a href="">{$member.username}</a></td>
        <td class="align_c" style="color:{if $member.groupid eq 1}green{else}blue{/if};">{$groups[$member.groupid].groupname}</td>
        <td class="align_c">{if $member.force_qq eq 1}是{else}否{/if}</td>
        <td class="align_c">{if $member.isfree eq 1}是{else}否{/if}</td>
        <td class="align_c">{if !empty($member.ip)}{$member.ip}{else}-{/if}</td>
        <td class="align_c">{if !empty($member.ip)}<a href="http://www.ip138.com/ips138.asp?ip={$member.ip}" target="_blank">查看</a>{else}-{/if}</td>
        <td class="align_c">{if !empty($member.lastvist)}{date('Y-m-d H:i:s', $member.lastvist)}{else}-{/if}</td>
        <td class="align_c">
            <a href="{$smarty.const.ADMIN_NAME}?m=admin&c=account&a=manage&op=edit&userid={$member.userid}">修改</a> |
            <a href="javascript:deleteConfirm('{$smarty.const.ADMIN_NAME}?m=admin&c=account&a=manage&op=delete&userid={$member.userid}')">删除</a> |
            <a href="{$smarty.const.ADMIN_NAME}?m=admin&c=account&a=manage&op=stop&userid={$member.userid}&ip={$member.ip}&isstop={if $member.isstop eq 1}0{else}1{/if}"{if $member.isstop eq 0} title="禁用的同时会强制其退出后台"{/if}>{if $member.isstop eq 1}启用{else}禁用{/if}</a> |
            <a href="{$smarty.const.ADMIN_NAME}?m=admin&c=account&a=manage&op=exit&ip={$member.ip}" title="您可以先更改此用户密码再强制退出，使其不能再登陆后台">强制退出</a>
        </td>
    </tr>
    {/foreach}
</table>
<div class="viciao" style="margin:5px 7px;">{$members.pages}</div>
{include file="admin/footer.htm"}
<script language="javascript">
function deleteConfirm(url) {
    if(window.confirm('确定删除管理员吗？')) {
        location.href = url;
    }
}
</script>